 <?php
include("../conn/conn.php");
header("content-type:text/html;charset=utf-8");
$pass=$_POST['password'];
$name=$_POST['name'];
$sql="select * from tb_gly where account='".$name."'";
$reslut=mysqli_query($link,$sql);
if(mysqli_num_rows($reslut)>0){
	echo ("<script>alert('此管理员名已经注册！');history.go(-1);</script>");
	exit;
	}
	$sql="insert into tb_gly (account,password) values('$name','$pass')";
	echo $name;
	$result=$link->query($sql);
	echo $pass;
	if($result){
	echo("<script>alert('管理员添加成功！');window.location.href='qx.php';</script>");
			}
	
?>